package com.roadjava.demo03.bean;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

public class UserInfo3 {

    @NotBlank(message = "你的名字不能为空")
    private String name;

    /**
     * 正整数，1-800
     */
    @NotNull
    @Min(value = 18, message = "你的年龄不能小于{value}岁，禁止进入")
    @Max(800)
    private Integer age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}